import axios from 'axios';

// function login(data) {
// 	return axios.post('/admin/login', data);
// }
//登录
let login = (data) => axios.post('/admin/login', data);

// 注册
let register = (data) => axios.post('/admin/register', data);

// 获得管理员列表
let list = (params) => axios.get('/admin/list', { params });

// 获取管理员个人资料
let info = (params) => axios.get('/admin/info', { params });

// 编辑管理员个人资料
let edit = (data) => axios.post('/admin/info', data);

// 检测用户名是否可用
let check = (data) => axios.post('/admin/check/username', data);

// 删除账户
let remove = (data) => axios.post('/admin/remove', data);
// 修改管理员的账户状态
let usable = (data) => axios.post('/admin/usable', data);
// 修改本账户信息
let account = (data) => axios.post('/admin/account', data);


export default {
	login,
	register,
	list,
	info,
	edit,
	check,
	remove,
	usable,
	account
}
